package com.anduinslegacy.armory;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Character {
	/**
	 * @param toon
	 * @param points
	 */
	public Character(String name, int points) {
		super();
		this.toon = name;
		this.points = points;
	}

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key key; 

	@Persistent
	private String toon;

	@Persistent
	private int points = 0;

	/**
	 * @return the toon
	 */
	public String getToon() {
		return toon;
	}

	/**
	 * @param toon
	 *            the toon to set
	 */
	public void setToon(String name) {
		this.toon = name;
	}

	/**
	 * @return the points
	 */
	public int getPoints() {
		return points;
	}

	/**
	 * @param points
	 *            the points to set
	 */
	public void setPoints(int points) {
		this.points = points;
	}

	/**
	 * @return the key
	 */
	public Key getKey() {
		return key;
	}

	/**
	 * @param key the key to set
	 */
	public void setKey(Key key) {
		this.key = key;
	}
}
